home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWFoundU / Include / FWRefCnt.h < prev   
Encoding:
Text File  |  1995-11-08  |  1.4 KB  |  62 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWRefCnt.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWREFCNT_H
  11. #define FWREFCNT_H
  12.  
  13. #ifndef FWRUNTYP_H
  14. #include "FWRunTyp.h"
  15. #endif
  16.  
  17. #if FW_LIB_EXPORT_PRAGMAS
  18. #pragma lib_export on
  19. #endif
  20.  
  21. //========================================================================================
  22. //    class FW_MRefCount
  23. //========================================================================================
  24.  
  25. class FW_CLASS_ATTR FW_MRefCount
  26. {
  27. public:
  28.     FW_DECLARE_CLASS
  29.  
  30. protected:
  31.     FW_MRefCount();
  32.     virtual ~FW_MRefCount();
  33.     
  34. public:
  35.     virtual long    Release();
  36.     virtual long    Acquire();
  37.  
  38.     long            GetRefCount();
  39.     
  40. private:    
  41.     long            fRefCount;
  42. };
  43.  
  44. //========================================================================================
  45. //    Inlines
  46. //========================================================================================
  47.  
  48. //----------------------------------------------------------------------------------------
  49. //    FW_MRefCount::GetRefCount
  50. //----------------------------------------------------------------------------------------
  51.  
  52. inline long FW_MRefCount::GetRefCount()
  53. {
  54.     return fRefCount;
  55. }
  56.  
  57. #if FW_LIB_EXPORT_PRAGMAS
  58. #pragma lib_export off
  59. #endif
  60.  
  61. #endif
  62.